<?php

$config = [
    'components' => [
        'request' => [
            // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
            'cookieValidationKey' => 'mGsGff9VDwGEpQvBxWywxyIaUl5d-zye',
        ],
        'cache' => [
            'class' => 'yii\caching\FileCache',//默认的文件缓存
        ],
        'redis' =>[
            'class' => 'yii\redis\Connection',
            'hostname' => '127.0.0.1',  //你的redis地址,windows建议使用127.0.0.1,否则会巨慢
            'port' => 6379, //端口
            'database' => 0,
        ],

    ],
];

if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
    ];

    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
    ];
}

return $config;
